<div class='fui-page fui-page-current'>
    <div class='fui-content'>
		<div style="background: #05c175;padding:0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.store.logo) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div class="bold">{{pagedata.store.title || 'stores名称'}} 
					<i class="icon icon-erweima" style="color:#FCC600" href="javascript:;" ng-click="pagedata.showyewu=true;pagedata.show_verify();"></i>
					</div>
					<div style="font-size:0.6rem">{{pagedata.store.desc}}</div>
					<div class="jylabel jylabel-switch-label">
								<span ng-class="{'jylabel-switch':1,'active':pagedata.isopenvoice==1}" ng-click="pagedata.isopenvoice=1;pagedata.openvoice(1);">开铃声</span>
								<span ng-class="{'jylabel-switch':1,'active':pagedata.isopenvoice!=1}" ng-click="pagedata.isopenvoice=0;pagedata.openvoice(0)">关铃声</span>
					</div>
				</div>
				<div class="fui-cellone-remark noremark" style="font-size:0.7rem;color:#fff;">
					<i href="javascript:" ng-click="access_json('jy_weishop_en/store.manage.store/')" class="icon icon-set"></i>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-3" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
						<div class="subtitle" style="font-size:12px;color:#fff">总访问</div>
						<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.store.looks || '0'}}</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
						<div class="subtitle" style="font-size:12px;color:#fff">今日订单</div>
						<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.ordernum || 0}}</div>
					</div>
					<div ng-click="access_json('jy_weishop_en/store.manage.order/')" class="fui-icon-col-sm external" style="margin:0">
						<div class="subtitle" style="font-size:12px;color:#fff">今日营收 <span style="color:#FCC600">更多>></span></div>
						<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.orderfee || 0.00}}</div>
					</div>
			</div>			
	</div>
	<div style="padding:0.5rem;margin-top:-2rem">
		<div class="fui-icon-group noborder  col-4" style="background:#fff">
					<div class="fui-icon-col-sm external" style="margin:0">
						<div ng-click="pagedata.scancode()" class="text bold" style="line-height:1.6rem;font-size:1rem">
								<i class="icon icon-saoyisao1" style="color:#039646;font-size: 1rem;"></i>
						</div>
						<div style="font-size:12px;">扫码核销</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
						<div ng-click="access_json('jy_weishop_en/store.manage.order/')" class="text bold" style="line-height:1.6rem;font-size:1rem">
							<i class="icon icon-dingdan" style="color:#039646;font-size: 1rem;"></i>
						</div>
					<div style="font-size:12px;">订单管理</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
						<div ng-click="access_json('jy_weishop_en/store.manage.myfee/')" class="text bold" style="line-height:1.6rem;font-size:1rem">
							<i class="icon icon-success" style="color:#039646;font-size: 1rem;"></i>
						</div>
						<div style="font-size:12px;">我的业绩</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
						<div ng-click="access_json('jy_weishop_en/store.manage.member/')" class="text bold" style="line-height:1.6rem;font-size:1rem">
							<i class="icon icon-paihao0" style="color:#039646;font-size: 1rem;"></i>
						</div>
						<div style="font-size:12px;">本店会员</div>
					</div>
		</div>
		<div class="fui-cell-group fui-cell-click mod-group">
							<div class="fui-cell external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.order/')">
								<div class="fui-cell-text bold">My order</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">LookAll订单</div>
							</div>
							<div class="fui-icon-group col-5 selecter">
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.order//status=0')">
									<div class="badge" ng-if="pagedata.status0>0">{{pagedata.status0}}</div>
									<div class="icon icon-green radius"><i class="icon icon-daifukuan1"></i></div>
									<div class="text">For the payment</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.order//status=1')">
									<div class="badge" ng-if="pagedata.status1>0">{{pagedata.status1}}</div>
									<div class="icon icon-orange radius"><i class="icon icon-daifahuo"></i></div>
									<div class="text">To send the goods</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.order//status=2')">
									<div class="badge" ng-if="pagedata.status2>0">{{pagedata.status2}}</div>
									<div class="icon icon-blue radius"><i class="icon icon-daishouhuo1"></i></div>
									<div class="text">For the goods</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.order//status=3')">
									<div class="icon icon-blue radius"><i class="icon icon-survey1"></i></div>
									<div class="text">待Evaluation</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.order//status=4')">
									<div class="badge" ng-if="pagedata.status4>0">{{pagedata.status4}}</div>
									<div class="icon icon-pink radius"><i class="icon icon-tuihuanhuo1"></i></div>
									<div class="text">return</div>
								</a>
							</div>
		</div>
		<div class="fui-cell-group fui-cell-click mod-group">
							<div class="fui-cell external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.goods/')">
								<div class="fui-cell-text bold">商城管理</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">LookGoods</div>
							</div>
							<div class="fui-icon-group col-4 selecter">
								<a ng-if="!pagedata.nocheck_goods" class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.goods/')">
									<div class="badge" ng-if="pagedata.goodsnum>0">{{pagedata.goodsnum}}</div>
									<div class="icon icon-green radius"><i class="icon icon-tianmaopaidui"></i></div>
									<div class="text">Goods管理</div>
								</a>
								<a ng-if="!pagedata.nocheck_store" class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.store/')">
									<div class="icon icon-green radius"><i class="icon icon-set"></i></div>
									<div class="text">storesSet </div>
								</a>
								<a ng-if="!pagedata.nocheck_verifyindex" class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/verify.index/')">
									<div class="icon icon-green radius"><i class="icon icon-saoyisao2"></i></div>
									<div class="text">普通Goods核销</div>
								</a>
								<a ng-if="!pagedata.nocheck_verifygoods" class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/verify.verifygoods/')">
									<div class="icon icon-green radius"><i class="icon icon-saoyisao2"></i></div>
									<div class="text">计次Goods核销</div>
								</a>
								<a ng-if="!pagedata.nocheck_selfindex" class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/verify.verifygoods/')">
									<div class="icon icon-green radius"><i class="icon icon-saoyisao2"></i></div>
									<div class="text">自提Goods核销</div>
								</a>
							</div>
		</div>
		<div class="fui-cell-group fui-cell-click mod-group">
							<div class="fui-cell external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.verifylog/')">
								<div class="fui-cell-text bold">核销记录</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">Look记录</div>
							</div>
							<div class="fui-icon-group col-4 selecter">
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.verifylog/')">
									<div class="icon icon-green radius"><i class="icon icon-dingdan"></i></div>
									<div class="text">订单核销</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.verifynumlog/')">
									<div class="icon icon-green radius"><i class="icon icon-dingdan"></i></div>
									<div class="text">计次核销</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_weishop_en/store.manage.verifyselflog/')">
									<div class="icon icon-green radius"><i class="icon icon-dingdan"></i></div>
									<div class="text">自提核销</div>
								</a>
							</div>
		</div>
		 </div>
    </div>
</div>
<div ng-if="pagedata.showyewu" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showyewu=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行“用户绑定stores”操作
				</div>
				<div class='fui-cell' style="padding-bottom:0">
					<div class="fui-cell-text c">
						<div class="img_box" id="show_verify_ewm">
						</div>
					</div>
				</div>
				<div class='fui-cell' style="margin-top:0;padding-top:0">
					<div class="fui-cell-text">
					<div class="error c">
						<p style="padding: 0 1.3rem">Warm prompt：提供本二维码给准客户扫码，将直接绑定该客户到本stores！</p>
					</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source src="../core/resource/images/neworder.mp3"></source>
</audio>
<script>
scope.pagedata.scancode=function () {
			console.log('scanQRCodeOK');
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					location.href = result;
				}
			});
}
scope.pagedata.show_verify=function(){
	var url=scope.pagedata.store.url;
	scope.tool.qr(url,'show_verify_ewm',150)
}
scope.pagedata.openvoice=function(type){
	var voicetime = 0;
    var openvoice;
	scope.post_json('jy_weishop_en/store.manage.index/openvoice/isopenvoice='+scope.pagedata.isopenvoice,{},function(res){
	});
	if(type==1){
		 openvoice = setInterval(() => {
			if(scope.pagedata.isopenvoice!=1){
				clearInterval(openvoice);
				return false;
			}
			scope.get('jy_weishop_en/store.manage.order/getnew/storeid='+scope.pagedata.store.id,function(res){
						console.log('openvoice');console.log(res);
						if(res!='none'){
							voicetime ++;
							$("#openvoice")[0].play();
						}
			});
		}, 5000);
	}
}
</script>